package com.example.demo20250517.controller;

import com.example.demo20250517.reponse.RespondResult;
import com.example.demo20250517.service.QuestionService;
import com.example.demo20250517.vo.QuestionAddVo;
import com.example.demo20250517.vo.QuestionResultAddVo;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;

/**
 * @Desctription: TODO
 * @Date: Created in 2025/5/17 10:35
 * @Version: 1.0
 */
@RestController
@RequestMapping("/bank")
public class QuestionBankController {

    @Resource
    private QuestionService questionService;

    /**
     *
     * @param questionAddVo
     * @return
     */
    @PostMapping("/add")
    private RespondResult<Object> add(@RequestBody QuestionAddVo questionAddVo) {
        return RespondResult.success(questionService.add(questionAddVo));
    }

    //删
    @GetMapping("/del")
    private RespondResult<Object> del(@RequestParam Long id) {
        return RespondResult.success(questionService.del(id));
    }

    //改


    //查


    //查询测评结果详情

    //获取测评结果

    @PostMapping("/addResult")
    private RespondResult<Object> addResult(@RequestBody QuestionResultAddVo questionResultAddVo) {
        return RespondResult.success(questionService.addResult(questionResultAddVo));
    }



}
